<select id="sellevel0" class="sel1"></select>
<select id="sellevel1" class="sel1"></select>
<select id="sellevel2" class="sel1"></select>
<input type="hidden" name="areaid" />
<script type="text/javascript">
    $(function () {
        $.getJSON("/area/findby1.jspx", function (data) {
            $("#sellevel0").empty();
            $.each(data, function (index, element) {
                var option = "<option value='" + element.id + "'>" + element.name + "</option>";
                $("#sellevel0").append(option);
            })
        });

        $("#sellevel0").change(function () {
            var current = $(this).find("option:selected").val();
            $("input[name='areaid']").val(current);
            $.getJSON("/area/findby" + current + ".jspx", function (data) {
                $("#sellevel1").empty();
                $.each(data, function (index, element) {
                    var option = "<option value='" + element.id + "'>" + element.name + "</option>";
                    $("#sellevel1").append(option);
                })
            });
        });

        $("#sellevel1").change(function () {
            var current = $(this).find("option:selected").val();
            $("input[name='areaid']").val(current);
            $.getJSON("/area/findby" + current + ".jspx", function (data) {
                $("#sellevel2").empty();
                $.each(data, function (index, element) {
                    var option = "<option value='" + element.id + "'>" + element.name + "</option>";
                    $("#sellevel2").append(option);
                })
            });
        });

        $("#sellevel2").change(function () {
            var current = $(this).find("option:selected").val();
            $("input[name='areaid']").val(current);
        });
    });
</script>